Advancing e-commerce user purchase prediction: Integration of time-series attention with event-based timestamp encoding and Graph Neural Network-Enhanced user profiling

In recent years, the global e-commerce landscape has witnessed rapid growth, with sales reaching a new peak in the past year and expected to rise further in the coming years. Amid this e-commerce boom, accurately predicting user purchase behavior has become crucial for commercial success. We introduce a novel framework integrating three innovative approaches to enhance the prediction model’s effectiveness. First, we integrate an event-based timestamp encoding within a time-series attention model, effectively capturing the dynamic and temporal aspects of user behavior. This aspect is often neglected in traditional user purchase prediction methods, leading to suboptimal accuracy. Second, we incorporate Graph Neural Networks (GNNs) to analyze user behavior. By modeling users and their actions as nodes and edges within a graph structure, we capture complex relationships and patterns in user behavior more effectively than current models, offering a nuanced and comprehensive analysis. Lastly, our framework transcends traditional learning strategies by implementing advanced meta-learning techniques. This enables the model to autonomously adjust learning parameters, including the learning rate, in response to new and evolving data environments, thereby significantly enhancing its adaptability and learning efficiency. Through extensive experiments on diverse real-world e-commerce datasets, our model demonstrates superior performance, particularly in accuracy and adaptability in large-scale data scenarios. This study not only overcomes the existing challenges in analyzing e-commerce user behavior but also sets a foundation for future exploration in this dynamic field. We believe our contributions provide significant insights and tools for e-commerce platforms to better understand and cater to their users, ultimately driving sales and improving user experiences.


Background
The globalization of e-commerce has surged dramatically in recent years, especially in the past year, its influence and value have been greatly amplified.According to related statistical data, global e-commerce sales reached a staggering $4.28 trillion in 2020 [1], and this number is expected to rise further to $5.4 trillion by 2024 [1].This impressive growth not only showcases the enormous potential of e-commerce but also reveals the significant challenges and issues underlying it.
In this e-commerce boom, predicting user purchasing behavior has become the key to business success.In fact, with the proliferation of social media and smart devices, consumer behavior data has become increasingly abundant and complex.For instance, a recent survey indicates that nearly 80% of online consumers browse or bookmark multiple times before making a purchasing decision [2].This trend not only reveals that consumer purchasing behaviors are becoming more diverse and nuanced, but it also offers valuable data resources for businesses.However, accurately predicting user purchasing intent from this intricate behavior data, such as browsing, bookmarking, and adding to cart, poses a significant challenge.
While traditional machine learning methods can to some extent address this predictive task, their model capacity and limitations in handling high-dimensional, temporal data often fall short in prediction accuracy.Specifically, traditional machine learning methods struggle to capture the deep patterns and implicit relationships in user behavior data, leading directly to prediction inaccuracies.Moreover, with the advent of the big data era, there has been an explosive growth in user behavior data, making data processing and analysis increasingly challenging.Furthermore, user purchasing behaviors are influenced by numerous factors, including personal preferences, social influence, economic conditions, etc.The combined effect of these factors makes predicting purchasing behaviors exceptionally complex.In addition, the wide variety of products, significant price differences, and frequent promotions on e-commerce platforms all influence user purchasing decisions, adding to the prediction difficulty.
Therefore, in order to stand out in fierce market competition, researching how to accurately predict user purchasing behavior, and optimizing product recommendations and ad placements, has become a core focus for both e-commerce enterprises and academic researchers.By delving into user purchasing behaviors, businesses cannot only enhance sales efficiency but also provide consumers with more personalized and accurate shopping recommendations, achieving a win-win for both business performance and user experience.

Main contributions
This paper presents a novel approach to addressing the challenges in e-commerce prediction tasks, focusing on enhancing the accuracy of purchase intent prediction and adapting to the dynamic e-commerce environment.The key contributions are summarized in three innovative aspects: • Time-Series Attention Model with Event-Based Timestamp Encoding: We innovate beyond traditional user purchase prediction methods by introducing a time-series attention model that incorporates event-based timestamp encoding.This approach captures the temporal dynamics in user actions more effectively, allowing for a nuanced understanding of user behavior and significantly improving the accuracy of predicting purchase behavior.
• Graph Neural Network Enhanced User Profiling and Behavior Fusion: To tackle the limitations of conventional user behavior analysis models, our framework integrates Graph Neural Networks (GNNs) for a deeper analysis of user behavior.By modeling users and their actions as a graph structure, the GNNs unravel complex relationships and patterns in user behavior, thereby enriching the understanding of the dynamic and interconnected nature of online user activities.
• Enhanced Model Adaptability through Meta-Learning: Our framework advances beyond traditional learning methods by integrating meta-learning techniques, enabling the model to autonomously adjust learning parameters in response to new data and domains.This innovative approach significantly boosts the model's flexibility and learning efficiency, making it adept at handling rapidly changing data environments and diverse learning tasks.
2 Literature review

Time series analysis and forecasting
Time series analysis is a pivotal technique in statistics and data science, extensively employed in forecasting stock markets, weather, traffic flows, and more.This method focuses on predicting future values based on historical data.Particularly in the e-commerce domain, time series analysis has been used to forecast user purchasing behaviors and product sales volumes [3].
Traditional time series analysis methods, such as the ARIMA (AutoRegressive Integrated Moving Average) model and Exponential Smoothing methods, although capable, tend to underperform when dealing with complex, high-dimensional, and non-linear data [4].Time series analysis is crucial in predicting user purchasing behaviors in e-commerce, where user actions exhibit pronounced temporal dependencies.Recent advancements in deep learning, such as the applications of RNN and LSTM, have transformed traditional approaches [5].However, these models face challenges like computational intensity and inability to capture long-term dependencies effectively [6,7].Furthermore, after achieving massive success in the field of natural language processing, the attention mechanism began to be applied to time series analysis.This mechanism allows models to focus more on specific time points during predictions, enhancing forecasting accuracy [8].In e-commerce, given the pronounced temporal dependencies in user behavior data, time series analysis is crucial.Additionally, the analysis must also consider individual user differences, product characteristics, seasonal factors, and more [9].Thus, accurately and efficiently performing time series analysis to predict user purchasing behaviors remains a challenging and research-worthy problem.
In the e-commerce domain, Lara-Benı ´tez [10] proposed a time series forecasting model based on deep neural networks.By incorporating additional features like users' historical purchase records and price fluctuations of products, the model significantly improved prediction accuracy.However, it did not take into account product seasonality and promotional events, and the model's performance significantly drops when faced with long-term dependencies.Chen [11], building on Lara-Benı ´tez [10]'s work, introduced a multi-model fusion approach that considers seasonality and promotional events.While it addressed some of the previously mentioned issues to some extent, it still did not fully exploit the long-term dependency information in the time series.Pan [7] proposed a hybrid model based on LSTM and attention mechanisms to effectively capture both long-term and short-term dependencies in time series, substantially enhancing the accuracy of purchase predictions.However, his model demands significant computational resources, making it potentially unsuitable for real-time forecasting scenarios.These studies indicate that designing a model capable of handling complex time series dependencies while also catering to real-time prediction requirements remains a pressing issue.
The limitations of existing time series analysis methods, such as their inadequacy in handling complex, high-dimensional data and lack of adaptability in dynamic e-commerce environments, necessitate advanced analytical frameworks [4,11].

User behavior analysis
E-commerce platforms such as Taobao and JD.com have a profound demand for user behavior analysis.This is not only because it can increase sales, but also because through precise analysis, platforms can effectively carry out advertising placements and personalized recommendations.User behavior analysis mainly focuses on different stages of actions like browsing, collecting, adding to the cart, and purchasing.
In the context of e-commerce, understanding and analyzing online user behavior, including aspects of habituation and decision-making processes, has become increasingly significant.Recent studies such as Sulikowski [12,13] have emphasized the importance of visual aspects and layout in recommendation systems, which significantly impact user purchase decisions.Additionally, the work by Yildiz [14] introduces a hyper-personalized product recommendation system focused on customer segmentation, highlighting the evolving nature of e-commerce strategies.
Traditional user behavior analysis methods often revolve around using basic statistical models to depict user actions [15].However, these methods tend to overlook the inherent connections and temporality between user behaviors [16,17].For instance, Kim [18] analyzed user purchasing behavior through basic statistical models, but it struggled to handle the intricate time dependencies between user actions.With the rise of deep learning, sophisticated models like Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN) have been employed to capture intricate patterns in user behaviors [19].Zhao [20]'s study, which utilized CNNs to identify patterns in user behaviors, achieved some success, but fell short in processing sequential data, thus limiting prediction accuracy.
In addition to traditional time-series analysis and deep learning techniques, novel approaches in purchase intent modeling have emerged in recent e-commerce studies.A fuzzy approach to model purchase intent, as proposed by Sulikowski [21], leverages user tracking data to create more personalized e-commerce recommenders.This method appreciates data uncertainty and provides insights into customer behavior in online shopping environments.Similarly, the analysis of unplanned purchase rules based on rough sets, as explored by Shibata [22], offers an understanding of consumer decision-making processes, particularly distinguishing between planned and unplanned purchases.These approaches underscore the importance of capturing nuanced buyer behaviors in the digital marketplace.
More recent studies have started integrating attention mechanisms into user behavior analysis.These methods can automatically assign different weights based on the significance of various behaviors, leading to more precise predictions [23].Zhou [24]'s study attempted to employ the attention mechanism to weight various user interactions, hoping to more accurately predict purchase intentions.This is crucial as, during the shopping process, different types of actions (like collecting or adding to the cart) may have varying impacts on purchase intentions.However, his model is computationally inefficient when facing large-scale real-time data, making it hard to fulfill the needs of real-time recommendations.
There is a growing trend towards employing sophisticated analytical techniques to understand user behavior in e-commerce platforms, as evidenced by recent literature focusing on predictive and evaluative frameworks [12][13][14].
In summary, building a model that can both capture intricate patterns in user behavior and efficiently process vast amounts of data is crucial for enhancing e-commerce platform sales and user experience.After an in-depth analysis of previous studies, our research aims to address these challenges, proposing a novel framework for user behavior analysis based on deep learning and attention mechanisms.We hope to offer a fresh perspective and practical value to the e-commerce field.

Critical review of traditional learning methods and the emergence of meta-learning
In addressing the limitations of traditional learning strategies and enhancing our model's performance, we turn to advanced meta-learning techniques.This approach is motivated by a critical review of recent literature, which highlights several shortcomings in existing methods.
Li [25] identified a significant limitation in traditional learning methods: the infeasibility of storing and retraining on all tasks as the number of tasks grows.This challenge necessitates more efficient learning strategies that can adapt without forgetting previous knowledge.Following this, Jan [26] pointed out the inadequacies of traditional data processing techniques in handling large volumes of data.This finding indicates a pressing need for robust learning frameworks capable of efficiently processing and learning from big data.
Teney [27] further highlighted the impracticality of traditional machine learning methods, which require training data to encompass all information to be learned.In dynamic and diverse data environments, this approach is unfeasible, suggesting a need for models that can adaptively learn from live data.In the same vein, Wang [28] underscored the limited effectiveness of traditional methods like cutout and random convolution in deep reinforcement learning, pointing to a gap in generalization performance that could be bridged by more adaptive learning strategies.
These two significant studies Xu [29] and Osa [30] collectively critiqued traditional ensemble learning methods and reinforcement learning algorithms for their lack of adaptability to noise, redundant features, and in learning diverse solutions.This underscores the necessity for more sophisticated, adaptable learning approaches.
Additionally, a series of papers between 2020 and 2022 focusing on e-commerce customer behavior prediction, including works by [16,31,32], highlighted the challenges faced by traditional machine learning approaches in e-commerce.These challenges include the need for more integrated and adaptive methods to accurately predict customer behavior.
The gap in traditional learning strategies, particularly in the context of e-commerce user behavior analysis, has been highlighted in recent research, underscoring the need for more integrated and adaptive methods [29,30,32].Our work aims to bridge these gaps by introducing a novel framework that integrates time-series analysis, graph neural networks, and metalearning techniques.
This study identifies key research gaps in the field of e-commerce user behavior analysis, particularly in the areas of dynamic behavior modeling, real-time data processing, and personalized recommendation accuracy.Our contribution lies in developing a comprehensive framework that addresses these challenges by integrating advanced time-series models, graph-based analysis, and meta-learning strategies.Our approach significantly enhances the prediction accuracy of user purchase behavior and offers practical insights for e-commerce platforms to optimize their strategies and user experiences.
In summary, our literature review establishes the context for our work by detailing the evolution of user behavior analysis in e-commerce, the challenges of existing predictive models, and the potential of advanced methodologies to offer more accurate and efficient solutions.

Symbols and terminology.
To describe the problem and methods systematically and clearly, we first define the main symbols and terms used in this paper.
• U: Set of users, representing all participants.U = {u 1 , u 2 , . .., u N }, where N is the total number of users.
• S u i : Action sequence of user u i , describing all actions of the user within the observation time window.
• t j : Timestamp of event a j .
• C u i : Contextual information of user u i , which may include geographical location, device information, etc.
• f: Prediction function used to forecast based on the action sequence S u i and contextual information C u i whether the user will make a purchase.
• L(f): Loss function to evaluate the performance of prediction function f.

Problem definition.
This paper investigates how to use various user behaviors from online shopping datasets including browsing, favoriting, adding to cart, and purchasing-to predict whether a user will make a purchase.To systematically address this challenge, we first define some fundamental mathematical symbols and concepts.
Let U be the set of users, U = {u 1 , u 2 , . .., u N }, where N is the number of users.Let A be the set of user actions, A = {a 1 , a 2 , . .., a M }, where M is the type of action (in this paper, M = 4 corresponding to browsing, favoriting, adding to cart, and purchasing).
Each user u i has an action sequence S u i , where S u i ¼ ½ðt 1 ; a 1 Þ; ðt 2 ; a 2 Þ; . . .; ðt n ; a n Þ�.Each (t j , a j ) represents the action a j taken by user u i at time t j .
Our goal is to construct a function f, which, based on the action sequence S u i of user u i and other potential contextual information C u i , predicts whether the user will make a purchase.Specifically: where 0 indicates no purchase, and 1 indicates a purchase.More specifically, we aim to minimize the following loss function: where y i represents the actual purchasing behavior of user u i (either 0 or 1).

Motivation for time-series attention model with event-based timestamp encoding
• Limitations of Current Methods: Traditional methods in user purchase prediction primarily focus on static features such as demographic information and historical purchase records [33].These approaches often fail to effectively capture the dynamic and temporal aspects of user behavior [31,34], such as the timing of actions like browsing, adding to cart, or saving items, which are critical for understanding and predicting user purchasing decisions.
• Our Innovation-Event-Based Timestamp Encoding: To address these limitations, we introduce an innovative time-series attention model that incorporates event-based timestamp encoding.This approach allows for a more nuanced capture of the temporal dynamics in user actions, significantly enhancing the model's ability to predict purchase behavior with higher accuracy.By integrating the precise timing of user interactions, our model can identify patterns and trends that traditional models overlook.

Time-series attention model with event-based timestamp encoding
Building on the motivations discussed above, this section details the mathematical structure of the time-series attention model, now enhanced with an event-based timestamp encoding mechanism.

Mathematical definition. Definition 1.
A time-series attention model with eventbased timestamp encoding is a function f : R T�D !R, incorporating event timestamps into the traditional time-series model.The function can be modified as: where α t are the attention weights, incorporating the event-based timestamp encoding E, calculated as: where W is the learnable weight matrix, b is the bias vector, and Encode(E t ) is the encoding function for the event timestamp.

Optimization with event-based timestamp encoding.
The integration of eventbased timestamp encoding into our time-series attention model leads to a more complex and nuanced optimization problem.We seek to minimize a loss function that not only considers the traditional features but also the temporal dynamics of user actions.
where Θ represents the model parameters, N is the number of samples, y i is the true label of the i − th sample, X i is the feature matrix, and E i is the event-based timestamp matrix for the i − th sample.Incorporating the event-based timestamps requires modifying the traditional attention mechanism.The attention weights, α t , are now a function of both the hidden state and the event timestamps: where h t is the hidden state at time step t, C is the context vector, E t is the event-based timestamp at time step t, and Θ includes parameters specific to the event-based encoding.
The attention function itself is adapted to include the influence of the event timestamps: where W h and W e are learnable weight matrices for the hidden states and event timestamps, respectively, and b is the bias vector.This formulation allows our model to dynamically adjust the attention mechanism based on the specific timing of user actions, offering a more accurate and robust prediction model for user purchase behavior.
From above we derive the following theorem, whose proof process is shown in the S1 Appendix.
Theorem 1. Complex Optimization of Time-Series Attention Model: Considering the timeseries attention model with event-based timestamp encoding, defined as function f : R T�D !R, the optimization of attention weights α t can be expressed by a complex formulation: with α t,i being calculated by:

Motivation for Graph Neural Network enhanced user profiling and behavior fusion
• Limitations of Current Methods: Traditional user behavior analysis models, including the time series attention model, primarily focus on temporal data, often neglecting the intricate interplay of user interactions and behaviors.These models lack the ability to capture complex relationships and patterns in user behavior, leading to a limited understanding of the dynamic and interconnected nature of online user activities [35,36].
• Our Innovation-Graph Neural Network-Based Analysis: To overcome these limitations, we propose an innovative integration of Graph Neural Networks (GNNs) for analyzing user behavior.By modeling users and their actions as a graph structure, where nodes represent users and behaviors, and edges symbolize the relationships or sequences of actions, GNNs enable us to uncover deeper and more complex relationships in user behavior.This approach significantly enhances the model's capability to analyze user behavior in a comprehensive and nuanced manner.

Graph Neural Network Enhanced user profiling and behavior fusion
Building on the foundation of user profiling and behavior fusion, we introduce a Graph Neural Network-based approach to further enhance our model's predictive capabilities.

Graph structure formulation. Definition 3 (User-Behavior Graph)
Let's define a graph G = (V, E), where V represents the set of nodes, each node corresponding to a user or a specific user action, and E represents the set of edges, indicating the relationships or sequences of actions between users.
3.5.2GNN-based user behavior analysis.Definition 4 (Graph Neural Network Function).A Graph Neural Network function GNN : R jVj � R jEj !R is defined to process the graph structure, capturing the complex interrelations among users and their behaviors.
where UPDATE(v) updates node representations based on their neighbors, and AGGREGATE combines these representations to capture the overall graph structure.

Optimization with GNN-Based user behavior analysis.
Integrating the Graph Neural Network (GNN) based analysis with the time series attention model requires advanced mathematical formulations, including calculus and linear algebra transformations.The fusion process is elaborated below: Let G = (V, E) be the user-behavior graph with V as nodes (users and behaviors) and E as edges (relationships).The GNN function, GNN(G), captures complex interactions within this graph: where TRANSFORM(v) updates the representation of each node incorporating its neighbors, and AGGREGATE merges these representations.
The transformation function for each node v is expressed as: RELATIONðu; vÞ where W v is the weight matrix for node v, RELATION(u, v) models the relationship as a function of distance in feature space, and A uv is the adjacency matrix.
The fusion of GNN output with the time series attention model output, F(U, A), is performed using a complex matrix operation: where W a and W v are the weight matrices for the attention model and GNN respectively.
The final prediction model combines user profiles, behavior sequences, and graph-based relationships: where σ is the sigmoid activation function.
This fusion model, enhanced with complex mathematical operations, effectively combines temporal insights and intricate relational data, offering a highly advanced predictive model for user behavior.
From above we derive the following theorem and lemma, whose proof process is shown in the S1 Appendix.
Theorem 2. Solution Properties of Graph Neural Network Enhanced User Profiling: Given the Graph Neural Network (GNN) formulation in Eq (11), the solution of the GNN-based user profiling satisfies the following properties:

Lemma 1. Convergence of GNN-Based User Behavior Analysis:
The Graph Neural Network (GNN) approach for user behavior analysis, as described by Eq (11), converges to a stable solution after a finite number of iterations.

Motivation for enhancing model adaptability through meta-learning
To address the limitations of traditional learning strategies and elevate our model's performance, we integrate advanced meta-learning techniques.This section discusses the shortcomings of existing methods and our innovative approach.
• Limitations of Traditional Learning Methods: Existing real-time update and transfer learning strategies predominantly rely on classical algorithms like Stochastic Gradient Descent (SGD).These methods, while effective in certain scenarios, lack the dynamic adaptability required to handle rapidly changing data environments and diverse learning tasks efficiently [37][38][39].
• Our Innovation-Advanced Adaptive Learning Strategies: To overcome these limitations, we propose integrating meta-learning methods into our model.Meta-learning, or learning to learn, allows the model to autonomously adjust its learning rate and other critical parameters, enhancing its ability to swiftly adapt to new data and domains.This approach not only improves the overall performance but also significantly boosts the model's flexibility and learning efficiency.

Implementation of meta-learning, transfer learning, and advanced adaptation
Meta-learning introduces a higher level of adaptability and efficiency to the model's learning process.It enables automatic adjustment of learning parameters based on incoming data, optimizing the model's response to new information.We formalize this through the following mathematical framework: Definition 5 (Meta-Learning for Model Adaptation).In meta-learning, the model parameters θ t are updated not only based on the current data point (x t , y t ) but also considering the learned strategy from historical data.
The enhanced model adaptation using meta-learning is described by: where η t is the adaptive learning rate determined by the meta-learning function F, H t represents the historical data, and M denotes the meta-parameters.
The optimization of the meta-learning function F is crucial for the adaptability and efficiency of our model.This process involves complex mathematical formulations, such as the use of Lagrange multipliers for constraint optimization.We detail this process as follows: Here, RðMÞ is a regularization term for the meta-parameters with λ as the regularization coefficient.To integrate these constraints, we apply the method of Lagrange multipliers: In this equation, α = (α 1 , α 2 , . .., α T ) represents the Lagrange multipliers.By setting the derivative of L with respect to α t to zero, we obtain the conditions for optimal F: The decomposition of the meta-learning function F is: In this formulation, C is a neural network with weights W and biases B, Enc is an encoder function for historical data, and σ is an activation function.The encoder function aggregates the historical data H t into a feature representation, which is then transformed by C. The optimization of meta-parameters M ¼ fW; Bg involves a complex process of minimizing the cumulative loss while adapting the learning strategy based on the historical data.This process ensures that the model learns the most effective strategy for parameter adaptation over time.
From above we derive the following lemma, whose proof process is shown in the S1 Appendix.

Lemma 2. Optimality of Meta-Learning Adaptation:
In the context of the meta-learning framework outlined in Eqs ( 17), ( 18), ( 19) and ( 20), the adapted model parameters θ t converge to an optimal set of parameters θ* that minimize the cumulative loss over the training dataset while ensuring adaptability to new data.
Through this advanced meta-learning implementation, incorporating complex mathematical optimization techniques, our model achieves superior adaptability and learning efficiency, making it highly suitable for dynamic and evolving data environments.

Algorithm pseudocode
In this section, we introduce the algorithmic implementation of the time series attention model.Algorithm 1 captures the importance of different time steps through an attention mechanism, as guided by Eqs ( 6), ( 7) and (8).

Dataset introduction
This study employs datasets on e-commerce user behavior analysis and live streaming e-commerce.These datasets offer valuable insights to e-commerce platforms, helping them to better understand consumers' shopping habits, preferences, and motivations.Leveraging this data, ecommerce platforms can devise strategies to enhance conversion rates, boost customer loyalty, and optimize operational results.Below is a detailed introduction of these two datasets: E-commerce User Behavior Analysis Dataset: This dataset primarily focuses on users' online shopping behavior and their interactions with the website.By analyzing user features, merchants can identify key target user groups.Through website optimization, and understanding users' behaviors on different pages, merchants can discern which pages are most popular and which may have issues or need optimization, thereby refining marketing strategies and enhancing conversion rates (available at https://tianchi.aliyun.com/dataset/124814).
Live Streaming E-commerce Dataset: This dataset centers on users' interactions with live streaming shopping and their purchase behaviors.By analyzing user-related variables, merchants can predict user behaviors and adopt measures to devise more effective strategies to retain them (available at https://tianchi.aliyun.com/dataset/154063).
The main utility of these datasets lies in providing in-depth insights into e-commerce user behaviors.Through this data, e-commerce platforms can formulate more precise market strategies, optimize user experiences, increase conversion rates, and ultimately drive sales growth.Whether it's traditional e-commerce or live streaming e-commerce, understanding the real needs and behaviors of users is paramount.Our experimental setup is shown in Table 1.

Beginning the shopping journey-the collection phase
When users develop an interest in certain products, they might further inspect the product details and save them to their collection.This action indicates a user's interest in a product; they might be comparing different products or contemplating a purchase.Data suggests that users browsing products are more likely to add them to their collection.The relationship between users' browsing and collecting behaviors is pivotal for e-commerce platforms since a user's collecting behavior might be an indicator of purchase intent.
Heat correlation maps are data visualization methods used to display the correlation or association strength between influencing factors.Typically, heat correlation maps use colors to depict the degree of correlation between factors.Darker colors usually represent a perfect positive correlation, often denoted by 1, while colors that deviate from this signify less correlation, often denoted by lighter shades.We utilize the heat correlation map to explore the relationship between user collection behaviors and whether they collect, and factors that might influence Table 2 provides a detailed display of the collection behavior of users in Dataset 1.The activity of female users in shopping significantly surpasses that of male users.Direct access is the primary source, followed by traffic from search engines.Although traffic generated by advertisements is the least, it still plays a certain role.Mobile device visits evidently exceed those from desktop devices.
Fig 2 showcases the collection behavior of users in Dataset 2. It can be observed that users who are willing to spend more time on products are more inclined to add them to their collections.Among users who collect, many continue to collect over a period of time.Products shipped from nearby locations are more likely to be collected.Through the comparison of various models, as shown in Fig 3, as the training epochs of the global model increase, the accuracy of our model steadily improves and is the highest.Additionally, our model's accuracy on Dataset 1 is approximately 15% higher than that of traditional models.When using Dataset 2, the accuracy is also about 18% higher than traditional models.Moreover, during experimentation, we observed that traditional models are highly unstable, whereas our model performs remarkably well.
Regarding loss values, the stability of our model compared to traditional models is influenced by the training of the global model.As seen in Fig 4, as the number of epochs for both datasets increases, the loss value of the traditional model becomes more unstable, whereas our model achieves the smallest loss value, and only our model demonstrates relative stability and optimal performance.By comparing the ROC curves of the models, as depicted in Fig 5, the area under our model's curve remains the largest and is above the dashed line in both datasets, indicating its superior performance over traditional models.Based on these comparisons, our model performs excellently and is far superior to traditional models.
For operators, they should pay more attention to female users, continuously optimize the content of product pages, strengthen search engine optimization, and ensure a good user experience on mobile devices.Offering more discounts or promotional events to attract users to collect, optimizing the user experience of the application, and improving the conversion rate of adding to the cart are essential.At the same time, using our model to predict user behavior can accurately recommend products to users within a certain traffic range on the platform.Table 3 details the behavior of users in Dataset 2 when adding products to the cart.Over time, there are more recent order users among the users who added products to favorites than those who haven't ordered for a long time.Young users have significantly higher order volumes than older ones, and products with discounts have a much higher order volume than those without discounts.
Through the filtering of users who added products to favorites, we experimentally compared the performance between our model and traditional models.As shown in Fig 8, as the global model training epochs increase, our model's accuracy in predicting whether a user who has favorited a product will add it to the cart has been steadily improving and is even higher than when predicting whether a user would favorite a product.Furthermore, our model has significantly higher accuracy on both Dataset 1 and Dataset 2 compared to when not filtering by favorites.This demonstrates the efficacy of our model in predicting user behavior.
For loss value, global model training has a certain impact on the stability of our model compared to traditional models.As shown in Fig 9, with the increase in the number of epochs for both datasets, our model's loss value on both Dataset 1 and Dataset 2 is much better than when not filtering by favorites.Our model consistently decreases in a stable manner, exhibiting relative stability and superiority.
Once again, by comparing the ROC curves of the models, as shown in Fig 10, our model covers the largest area and is above the dashed line in both datasets, indicating its performance is significantly better than random prediction.The area under the ROC curve is larger than  when not filtering by favorites, which further demonstrates the superior performance of our model compared to traditional models.
For website operators, they should pay more attention to mobile users, optimize the conversion rate from the listing page to the product page, and consider enhancing search engine optimization and advertising effectiveness.Young users are more active on the platform; the importance of discounted promotional orders is emphasized again by whether the user adds products to the cart.It's essential to promptly apply our prediction method to predict each user's behavior and make timely adjustments.

Final decision-purchase phase
Purchasing marks the culmination of the entire shopping journey.When users decide to make a purchase, they might have overcome all their concerns and reservations including those about the price, quality, and delivery policy.At this point, the buying decision is typically based on trust and satisfaction with the product and trust in the platform.Data indicates that users who have saved items to their favorites or added them to their cart are the most likely to buy.
Heatmaps are a data visualization method used to show the correlation or association strength between factors.Typically, heatmaps use colors to depict the degree of correlation between factors, where darker colors represent a perfect positive correlation, often denoted by 1.The further away from 1, the less the correlation, typically shown in lighter colors.We explored the relationship between user buying behavior and the decision to buy, along with factors that might influence this decision using the heatmap, as shown in Fig 11 .Next, we will analyze the relationship between the top three factors affecting user's saving behavior and the decision to buy.
Table 4 provides a detailed display of the buying behavior in Dataset 1.Although Windows users are the most numerous, iOS users have a slightly higher conversion rate.Users from direct sources have the highest number reaching the payment confirmation page.From a conversion rate perspective, those coming directly have the highest conversion rate.Users on mobile devices are more inclined to make a purchase.The area covered by our model's curve is the largest in both datasets, and it lies above the dashed line, suggesting its performance is significantly better than random predictions.The larger area under the ROC curve confirms the superior performance of our model compared to conventional models.

Discussion
Our investigation into e-commerce user behavior has unveiled several intriguing insights, some of which were unforeseen prior to our experimental analysis.Notably, the distinct  impact of targeting specific user demographics, such as iOS users, was more pronounced than initially anticipated.This finding suggests an underexplored potential in segment-specific strategies within e-commerce, a revelation that could steer future marketing tactics.Furthermore, the effectiveness of personalized incentives, like issuing coupons for products added to carts, revealed a deeper layer of user behavior dynamics.These strategies, while anticipated to be beneficial, yielded results exceeding our initial expectations in their ability to influence purchase decisions.This underscores the hidden complexities in user decision-making processes that are often overshadowed in conventional analysis.
Perhaps most surprisingly, our approach of combining time-series attention with eventbased timestamp encoding provided insights beyond traditional purchase behavior predictions.While we expected improvements over standard methods, the degree to which our model captured the temporal nuances of user actions was not fully anticipated.This discovery has significant implications, suggesting that e-commerce platforms may need to reconsider how they interpret and react to user interactions over time.
Reflecting on these findings, we recognize that our research has not only contributed to the advancement of user behavior analysis in e-commerce but also opened new avenues for exploration.The unexpected aspects of our results emphasize the need for continual reassessment of our understanding of user behavior, especially in the ever-evolving landscape of e-commerce.

Conclusion
Our study provides a comprehensive analysis of the e-commerce shopping journey, elucidating the continuous and logical path users take from item selection to final purchase.The introduction of a time-series attention model integrated with Graph Neural Networks and advanced meta-learning techniques not only enhances the accuracy of purchase behavior predictions but also demonstrates adaptability in rapidly changing e-commerce environments.
Looking forward, our work opens avenues for further research into the intricate relationship between e-commerce user behavior and shopping psychology.Particularly, exploring impulsive buying tendencies in live-streaming environments stands out as a promising future direction.This exploration could provide valuable insights for e-commerce platforms to refine their strategies, thereby increasing user engagement and sales.
The empirical validation of our model through various metrics reinforces its superiority over traditional models, particularly in large-scale and dynamic data scenarios.By addressing the current challenges in e-commerce user behavior analysis, our research lays a robust foundation for future studies to investigate the complex interplay of user behavior, shopping psychology, and technological advancements in e-commerce.
these collection behaviors.As shown in Fig 1, we will subsequently analyze the top three factors influencing user collection behaviors and their relationship with the collection action.

Fig 12 details the purchasing behavior in Dataset 2 .
Users who have already added items to their cart tend to wait for coupons to make a purchase.The longer a user spends on a product, the more likely they are to use a coupon; younger users consistently place more orders than older individuals.Finally, we compared the performance of various models using data from users who saved items to their favorites and added them to their cart.As Fig 13 indicates, as the global model's training epochs increased, our model's accuracy progressively improved.Additionally, our model's predictions on both Dataset 1 and Dataset 2 significantly outperformed those made

Table 3 . Dataset 2: The relationship between whether a product is added to the shopping cart or not.
https://doi.org/10.1371/journal.pone.0299087.t003